﻿
namespace EnsureWeb.Web.DataModel
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Data.Objects.DataClasses;
    using System.Linq;
    using System.ServiceModel.DomainServices.Hosting;
    using System.ServiceModel.DomainServices.Server;


    // The MetadataTypeAttribute identifies MembershipPowerMetadata as the class
    // that carries additional metadata for the MembershipPower class.
    [MetadataTypeAttribute(typeof(MembershipPower.MembershipPowerMetadata))]
    public partial class MembershipPower
    {

        // This class allows you to attach custom attributes to properties
        // of the MembershipPower class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class MembershipPowerMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private MembershipPowerMetadata()
            {
            }

            public string Desc { get; set; }

            public int Id { get; set; }

            public EntityCollection<MembershipRolePower> MembershipRolePower { get; set; }

            public string Name { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies MembershipRoleMetadata as the class
    // that carries additional metadata for the MembershipRole class.
    [MetadataTypeAttribute(typeof(MembershipRole.MembershipRoleMetadata))]
    public partial class MembershipRole
    {

        // This class allows you to attach custom attributes to properties
        // of the MembershipRole class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class MembershipRoleMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private MembershipRoleMetadata()
            {
            }

            public string Desc { get; set; }

            public int Id { get; set; }
             [Include]
            public EntityCollection<MembershipRolePower> MembershipRolePower { get; set; }

            public EntityCollection<MembershipUser> MembershipUser { get; set; }

            public string Name { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies MembershipRolePowerMetadata as the class
    // that carries additional metadata for the MembershipRolePower class.
    [MetadataTypeAttribute(typeof(MembershipRolePower.MembershipRolePowerMetadata))]
    public partial class MembershipRolePower
    {

        // This class allows you to attach custom attributes to properties
        // of the MembershipRolePower class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class MembershipRolePowerMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private MembershipRolePowerMetadata()
            {
            }

            public MembershipPower MembershipPower { get; set; }

            public MembershipRole MembershipRole { get; set; }

            public int PowerId { get; set; }

            public int RoleId { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies MembershipUserMetadata as the class
    // that carries additional metadata for the MembershipUser class.
    [MetadataTypeAttribute(typeof(MembershipUser.MembershipUserMetadata))]
    public partial class MembershipUser
    {

        // This class allows you to attach custom attributes to properties
        // of the MembershipUser class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class MembershipUserMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private MembershipUserMetadata()
            {
            }

            public Nullable<DateTime> AddTime { get; set; }
            
            public Nullable<DateTime> EditTime { get; set; }
            
            [Include]
            public MembershipRole MembershipRole { get; set; }

            public string Pwd { get; set; }

            public int RoleId { get; set; }

            public string UserName { get; set; }
        }
    }

}
